#include "Arduino.h"
//#define     SHELL_USING_CMD_EXPORT      0
extern "C"
{
    
    //在shell_cmd_list.c中，添加extern 声明,并添加到shellDefaultCommandList
    void func0(int argc, char *argv[])
    {
        Serial.printf("%dparameter(s)\r\n", argc);
        for (char i = 1; i < argc; i++)
        {
            Serial.printf("%s\r\n", argv[i]);
        }
    }
    //SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN), func, func, test);//vs 不支持该方式编译


    //在shell_cmd_list.c中，添加extern 声明,并添加到shellDefaultCommandList
    int func1(int i, char ch, char *str)
    {
        Serial.printf("input int: %d, char: %c, string: %s\r\n", i, ch, str);
        return 0;
    }
    //SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC), func, func, test);//vs 不支持该方式编译
}